\PassOptionsToPackage{no-math}{fontspec}
\documentclass{ctexart}

%图文排版
\usepackage{graphicx}
% \usepackage{text-figure}
\usepackage{caption}
\captionsetup{font=small,skip=1pt,justification=centering}
\captionsetup[figure]{labelfont=bf,textfont=it}
%用法:\textfigure[text-ratio = 0.85]{文本内容}{\includegraphics[]{}}

%文章配色相关
\usepackage{color}
\usepackage[dvipsnames]{xcolor}
\definecolor{Winered}{RGB}{250, 144, 130}
\definecolor{Newblue}{RGB}{48, 203, 240}
\definecolor{Deepblue}{RGB}{28, 117, 138}
\definecolor{Lightblue}{RGB}{199, 233, 241}
\definecolor{GRAYa}{RGB}{230, 230, 230}
\definecolor{orange}{RGB}{232, 160, 37}
\newcommand{\winered}[1]{{\color{Winered}#1}}%颜色命令
\newcommand{\newblue}[1]{{\color{Newblue}#1}}%颜色命令

%一些数学包
\usepackage{amsmath}
% \usepackage{Setting/exam-zh-symbols}
\usepackage{amsthm}
\usepackage{amssymb}
% \usepackage{yhmath}

%%三线表
\usepackage{booktabs} 

%设置页边距
\usepackage{geometry}
\geometry{a4paper,hmargin={1.5in,1.5in},vmargin={3cm,3cm}}
% \newgeometry{hmargin={0.6in,0.6in},vmargin={2cm,2cm}}

%设置字体
% \usepackage{mathspec}
% \setmainfont{Times New Roman}
% \setmathfont(Digits,Greek,Latin){Times New Roman}
% \setCJKmainfont{Source Han Serif SC}
\usepackage{xeCJK}
\linespread{1.5}

\usepackage{listings}
\lstset{
    language=Tex, % 设置语言
    basicstyle=\ttfamily, % 设置字体族
    breaklines=true, % 自动换行
    keywordstyle=\bfseries\color{Newblue}, % 设置关键字为粗体
    morekeywords={keys,nn,N,n,tl}, % 设置更多的关键字，用逗号分隔
    emph={}, % 指定强调词，如果有多个，用逗号隔开
    emphstyle=\bfseries\color{Winered}, % 强调词样式设置
    commentstyle=\itshape\color{black!50!white}, % 设置注释样式，斜体，浅灰色
    stringstyle=\bfseries\color{PineGreen!90!black}, % 设置字符串样式
    columns=flexible,
    numbers=left, % 显示行号在左边
    numbersep=0.8em, % 设置行号的具体位置
    numberstyle=\footnotesize \color{orange} , % 缩小行号
    % frame=single, % 边框
    % framesep=1.5em % 设置代码与边框的距离
}


\usepackage[most]{tcolorbox}
\usepackage{marginnote}

\tcbset{
    gitexample/.style={
        boxrule=1pt,top=2mm,bottom=0pt,left=12pt,right=2pt,width = \textwidth,
        listing and comment,comment={#1},skin=bicolor,
        fonttitle=\bfseries,coltitle=White,
        % frame style={draw=black,left color=Newblue,right color=Newblue},
        colframe=RoyalPurple!55!Aquamarine!100!,
        colback=GRAYa,colbacklower=White,
        % colupper=white,collower=black,
        listing options={
            language=Tex,
            aboveskip=0pt,belowskip=0pt,nolol,
            basicstyle=\ttfamily\bfseries,extendedchars=true,
            morekeywords={keys,nn,N,n,tl}, % 设置更多的关键字，用逗号分隔
        }
    }
}

\newtcbox{\coding}{
        on line,sharp corners, arc = 1pt, outer arc = 0pt,capture=hbox,fontupper = \ttfamily,
        colback = GRAYa, colframe = RoyalPurple!55!Aquamarine!100!,
        boxsep = 0pt, left =2pt, right = 2pt, top = 2pt, bottom = 2pt,
        boxrule = 0pt, bottomrule = 1pt, toprule = 1pt
}
\newcommand{\code}[1]{\hspace{2pt}\coding{#1} \hspace{2pt}}
\newcommand{\order}[1]{\textbackslash #1}
\newcommand{\mgcode}[1]{
    \reversemarginpar 
    \marginpar{\flushright\coding{#1}}
}

\title{\bf  CCNU-format:实习见习材料\LaTeX 模板}
\author{林康益,谭航}

\begin{document}

\maketitle

\section{CCNU-format简介}

    欢迎使用CCNU-format，本模板\code{CCNU-format}按照华中师范大学本科见习实习材料册的规范开发，为减轻大家的排版压力，专注于内容写作，因此设计了许多针对性的用户接口以及内容样式。希望大家能借助此模板快速作出一份排版精美的实习见习资料册！
    
    %介绍运行环境，模板构成...

    \begin{table}[htbp]
        \centering
        \begin{tabular}{ll}
            \toprule
            宏包名 & 功能简介 \\
            \midrule
            exam-zh-symbols & 提供一些特殊符号.如:$\vec{a},\vec{AB}$ \\
            text-figure & 图文混排 \\
            \bottomrule
        \end{tabular}
        \captionof{table}{CCNU-format依赖}
        \label{tab:my_label}
    \end{table}
    
\newpage 
\newgeometry{a4paper,hmargin={5cm,0.6in},vmargin={2cm,2cm}}

\mgcode{\order{ccnu}}
\begin{tcblisting}{
    title={基本信息模块},
    gitexample={}}
\keys_set:nn{information} %为 information 模块的键值赋值
{
  school = 数学与统计学学院,       %学校
  major  = 数学与应用数学(师范),   %专业
  name   = 你的姓名,               %姓名
  ID     = 2019200001,             %学号
  periodA = 2022.6.29~-~2022.7.5,  %见习时间 
  periodB = 2022.~9~-~2022.~11,    %实习时间  学院给的封面上已有
  institution =  某某市某某中学    %实习单位
}
\end{tcblisting}



\end{document}
